package com.itheima.wemedia.feign;

import com.itheima.common.vo.ResultVo;
import com.itheima.wemedia.pojo.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "leadnews-wemedia", contextId = "wmUserFeign")
public interface WmUserFeign {
    // 通过ap_user_id查询 wm_user表
    @GetMapping("/api/wmUser/getByApUserId/{apUserId}")
    ResultVo<WmUser> getByApUserId(@PathVariable(value = "apUserId") Long apUserId);

    // 创建 WmUser 对象
    @PostMapping("/api/wmUser/add")
    ResultVo<WmUser> addWmUser(@RequestBody WmUser wmUser);

}
